<?php
/**
* Remind the user of his/her password. 
*
* $Id: remindme.php 38 2005-04-03 06:02:47Z vluther $ 				
* @package user_interface
* @version $Rev: 38 $
* @copyright Copyright &copy; 2000-2007, Linuxpowered, Inc               
* @author Vidyut Luther <vid@linuxpowered.com> 
**/


if(empty($_POST)) {
  require_once './templates/remindme.html';
} else {
  require_once '/etc/binder.conf'; 
  $email = $_POST['email']; 
  $sql = "SELECT email,password FROM users where email='$email'";
  $rs = $db->mRun($sql); 
  while($row=mysql_fetch_assoc($rs)) {
    $password = $row['password']; 
    $dbemail = $row['email']; 
    

    $msg = "The username password for your account are as follows:
Username: $dbemail \n 
Password: $password \n"; 

mail("$email", "Password for Binder", "$msg");

  }
   
}
?>
